<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var a = 11;
        var b = 23;

        // 方式一：借助中间变量完成
        // var c = b;
        // b = a;
        // a = c;
        // console.log(a,b);

        // 方式二：不借助中间变量

        console.log(a, b);
        a = a + b;     
        b = a - b;
        a = a - b;

        console.log(a, b);


    </script>
</body>

</html>